package com.wang.service.impl;


import com.alibaba.dubbo.config.annotation.Service;
import com.wang.dao.IActionDAO;
import com.wang.dao.IRoleDAO;
import com.wang.service.IMemberAuthorizationService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.Map;

@Service
public class MemberAuthorizationServiceImpl implements IMemberAuthorizationService {

    @Autowired
    private IRoleDAO roleDAO;
    @Autowired
    private IActionDAO actionDAO;

    @Override
    public Map<String, Object> listByMember(String mid) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("allRoles", this.roleDAO.findAllByMember(mid));
        map.put("allActions", this.actionDAO.findAllByMember(mid));
        return map;
    }
} 
